<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,user-scalable=no"/>
		<title></title>
		<style>
			body{
				margin:0 ;
			};
			body,html{
				height: 100%;
				overflow: hidden;
				position: relative;
			}
			header{
				height: 40px;
				font-size: 20px;
				color: #fff;
				text-align: center;
				line-height: 40px;
				background: #333;
			}
			#wrap{
				position: absolute;
				left: 0;
				right: 0;
				bottom: 0;
				top:40px;
				overflow: hidden;
			}
			#list{
				margin: 0;
				list-style: none;
				padding: 0;
			}
			#list li{
				height: 30px;
				border-bottom:1px solid #333;
				line-height: 30px;
				text-indent: 20px;
			}
		</style>
		<script>
			document.addEventListener('touchstart',function(e){
				e.preventDefault();
			})
			function setInner(){
				var list = document.querySelector("#list");
				var inner = '';
				for(var i=0; i<100; i++){
					inner += '<li>这是第'+i+'个li</li>'
				};
				list.innerHTML = inner;
			};
			window.onload = function(){
				setInner();
				var wrap = document.querySelector('#wrap');
				var list = document.querySelector('#list');
				var startPoint = 0;
				var startEl = 0;
				var elTraslateY = 0;
				list.addEventListener('touchstart',function(e){
					startPoint = e.changedTouches[0].pageY;
					startEl = elTraslateY;
				});
				list.addEventListener('touchmove',function(e){
					var nowPoint = e.changedTouches[0].pageY;
					var dis = nowPoint - startPoint;
					elTraslateY = startEl + dis;
					list.style.WebkitTransform = list.style.transform = 'translateY('+ elTraslateY +'px)'
				});
			}
		</script>
	</head>
	<body>
		<header>妙味滑屏</header>
		<div id="wrap">
			<ul id="list"></ul>
		</div>
		
	</body>
</html>
